// 今日待办
import http from '../utils/httpInstance'

// 创建
export function createTask(data: object) {
  return http.post('/task', data, { headers: { successAlert: true } })
}

// 查询
export function getTask(params?: object) {
  return http.get('/task', { params })
}

// 删除
export function deleteTask(id: unknown) {
  return http.delete(`/task/${id}`)
}

// 更新
export function updateTask(id: unknown, data?: object) {
  return http.put(`/task/${id}`, data)
}
